﻿using NMF.Languages.AnyText.ClassConstruction;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NMF.Languages.AnyText
{
    public class RegexTypeTerminal : DataTypeTerminal<RegexType>
    {
        public RegexTypeTerminal(string name, RegexType type)
            : base(name, type)
        {}

        public RegexTypeTerminal(string name) : this(name, new RegexType()) { }

        public override DataTypeTerminal<RegexType> CreateCustom()
        {
            return new RegexTypeTerminal("Regex", new RegexType());
        }

        public override Irony.Parsing.BnfExpression CreateRule(AnyTextGrammar grammar)
        {
            return grammar.String.Rule;
        }
    }
}
